onSyncServer

open fun onSyncServer()

Runs on the logical server as config is about to be synced to a client. This occurs when the player is logging in and when datapacks are reloaded. This is distinct from onUpdateServer, which fires when changes are made to a config in-game, which are also synced. This is the initial sync of the entire config state.

This should only perform client logic, and it is good practice to insulate client-only code by putting a method reference to a dedicated client-only class in this call.

Author

fzzyhmstrs

Since

0.5.0

See also